import request from "@/utils/request";
import BASE_URL from '@/utils/env'

export const getAddressDataAPI = () =>{
    return request({
        url: 'address/query'
    })
}

export const deleteOneAddressAPI = data => {
    return request({
        url: 'address/del',
        method: 'post',
        data
    })
}

export const updateOneAddresAPI = data => {
    return request({
        url: 'address/update',
        method: 'post',
        data
    })
}

export const addAddressAPI = data => {
    return request({
        url: 'address/add',
        method: 'post',
        data
    })
}

export const queryOneAddressAPI = id => {
    return request({
        url: 'address/queryOne',
        data: {
            id
        }
    })
}

export const queryDefaultAddressAPI = () => {
    return request({
        url: 'address/queryDefault'
    })
}
